﻿<%@ Page Title="" Language="C#" MasterPageFile="MasterPage.master" AutoEventWireup="true" CodeFile="Estatisticas.aspx.cs" Inherits="_Estatisticas" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .tabela {font: 16px tahoma, arial;}
        .tabela img {margin-right:4px;}
        .tabela2 {font: 14px tahoma, arial; margin-top:5px;}
        .tabela2 th, .tabela2 td {padding: 3px;}
        .style2
        {
        }
        .style3
        {
            width: 37px;
        }
        .style4
        {
            width: 9px;
            height: 9px;
        }
        .style6
        {
            width: 37px;
            height: 21px;
        }
        .style8
        {
            height: 21px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h1>Estatísticas</h1>
<table style="width:494px; margin-top:10px;" class="tabela">
    <tr>
        <td style="width:200px;" colspan="2">
            <strong>Qtde de registros:</strong></td>
        <td style="width:294px;">
            <asp:Label ID="lblQtdeRegistros" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td colspan="3" style="height:5px;"></td>
    </tr>
    <tr>
        <td colspan="3">
            <strong>Qtde de candidatos com:</strong></td>
    </tr>
    <tr>
        <td colspan="3">
            </td>
    </tr>
    <tr>
        <td style="width:37px;" align="right">
            <img class="style4" src="../figuras/bullet.gif" /></td>
        <td style="width:163px;">
            Capacitação:</td>
        <td style="width:294px;">
            <asp:Label ID="lblCap" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="right">
            <img class="style4" src="../figuras/bullet.gif" /></td>
        <td>
            Aperfeiçoamento:</td>
        <td>
            <asp:Label ID="lblAperf" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="right">
            <img class="style4" src="../figuras/bullet.gif" /></td>
        <td>
            Informática:</td>
        <td>
            <asp:Label ID="lblInfo" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="right">
            <img class="style4" src="../figuras/bullet.gif" /></td>
        <td>
            Idiomas:</td>
        <td>
            <asp:Label ID="lblIdiomas" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="right">
            <img class="style4" src="../figuras/bullet.gif" /></td>
        <td>
            Ativ. Complementares:</td>
        <td>
            <asp:Label ID="lblAtivCom" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="right">
            <img class="style4" src="../figuras/bullet.gif" /></td>
        <td>
            Aprendiz:</td>
        <td>
            <asp:Label ID="lblAprendiz" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="right">
            <img class="style4" src="../figuras/bullet.gif" /></td>
        <td>
            Experiência:</td>
        <td>
            <asp:Label ID="lblExp" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td colspan="3">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style1" colspan="3">
            <strong>Nº de Candidatos por atividade:</strong></td>
    </tr>
    <tr>
        <td class="style1" colspan="3">
            <asp:GridView ID="gridNInscritos" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" CssClass="tabela2" DataSourceID="dsNInscritosPorAtividade" 
                EnableModelValidation="True" ForeColor="#333333" GridLines="None" 
                Width="494px" AllowSorting="True">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:HyperLinkField DataNavigateUrlFields="codcurso" 
                        DataNavigateUrlFormatString="ListagemInscritosCurso.aspx?codcurso={0}" 
                        DataTextField="Curso" HeaderText="Curso" SortExpression="Curso">
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:HyperLinkField>
                    <asp:BoundField DataField="NInscritos" HeaderText="Nº inscritos" 
                        SortExpression="NInscritos">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            </asp:GridView>
            <asp:SqlDataSource ID="dsNInscritosPorAtividade" runat="server" 
                ConnectionString="<%$ ConnectionStrings:conexao_intranet %>" 
                ProviderName="<%$ ConnectionStrings:conexao_intranet.ProviderName %>" SelectCommand="SELECT CamaraCursos.CodCurso, CamaraCursos.Curso, Count(CamaraInscritosCursos.CPF) AS NInscritos
FROM CamaraCursos INNER JOIN CamaraInscritosCursos ON CamaraCursos.CodCurso = CamaraInscritosCursos.CodCurso
GROUP BY CamaraCursos.CodCurso, CamaraCursos.Curso
ORDER BY CamaraCursos.Curso;
"></asp:SqlDataSource>
        </td>
    </tr>
    <tr>
        <td class="style1" colspan="3" align="right">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style1" colspan="3" align="left">
            <strong>Agrupado por Escolaridade</strong></td>
    </tr>
    <tr>
        <td class="style1" colspan="3" align="left">
            <asp:GridView ID="gridEscolaridade" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" CssClass="tabela2" DataSourceID="dsEscolaridade" 
                EnableModelValidation="True" ForeColor="#333333" GridLines="None" 
                Width="494px" AllowSorting="True">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField DataField="Escolaridade" HeaderText="Escolaridade">
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="NInscritos" HeaderText="Nº inscritos">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            </asp:GridView>
            <asp:SqlDataSource ID="dsEscolaridade" runat="server" 
                ConnectionString="<%$ ConnectionStrings:conexao_intranet %>" 
                ProviderName="<%$ ConnectionStrings:conexao_intranet.ProviderName %>" SelectCommand="SELECT CamaraInscritos.Escolaridade, Count(CamaraInscritos.CodInscrito) AS NInscritos
FROM CamaraInscritos
GROUP BY CamaraInscritos.Escolaridade
ORDER BY CamaraInscritos.Escolaridade;
"></asp:SqlDataSource>
        </td>
    </tr>
    <tr>
        <td class="style1" colspan="3" align="right">
            <asp:ImageButton ID="ImageButton1" runat="server" 
                ImageUrl="../figuras/bVoltar.gif" PostBackUrl="candidatoopcoes.aspx" />
        </td>
    </tr>
    </table>

</asp:Content>

